import 'package:intl/intl.dart';

class DateUtil {
  static String formatDateTimeToChinese(DateTime dt) {
    List<String> weekdays = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'];
    String datePart = DateFormat('yyyy年M月d日').format(dt);
    String weekdayPart = weekdays[dt.weekday - 1];
    return '$datePart $weekdayPart';
  }
  static String formatDateTimeToChineseNoYear(DateTime dt) {
    List<String> weekdays = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日'];
    String datePart = DateFormat('M月d日').format(dt);
    String weekdayPart = weekdays[dt.weekday - 1];
    return '$datePart $weekdayPart';
  }
}

